19. Hardware Related Commands > 19.8 AT^SAADC   Show ADC Adjustment Values

19.8
AT^SAADC   Show ADC Adjustment Values
The AT^SAADC command is intended only for the TC65 Terminal. It returns TC65 Terminal specific values needed to recalculate the raw values captured with AT^SRADC in order to obtain the actual voltage applied at the ADCx_IN input of the Terminal. The recalculation is necessary to account for the effect of component tolerances, mainly caused by the measurement amplifier inside the TC65 Terminal. The amplifier is used to scale down the ADCx_IN input voltage of the TC65 Terminal (5V) to the ADCx_IN input voltage of the in-built TC65 Module (2.4V).

To recalculate the exact voltages measured at the ADC1_IN input use the following equation:
Value = (<value> from AT^SRADC - <ofs1>) * <amp1> / 4096
where the divisor 4096 is constant. For ADC2_IN use the equivalent parameters <ofs2> and <amp2>.

The voltage offset and the amplification factor are specific to each TC65 Terminal. The values are stored in the device and are not changeable. Therefore, it is necessary to read the values only once in the lifetime of the TC65 Terminal. ADC1_IN and ADC2_IN may have different offset values and amplification factors.
Syntax
Read Command  
Response(s)
Reference(s) 
PIN 
ASC0 
ASC1 
USB 
MUX1 
MUX2 
MUX3 
Charge 
Last 

Parameter Description
 
<ofs1>(num)
Offset in mV to be deducted from the measurement <value> captured with AT^SRADC at ADC1_IN.
-32768...+32767
 
 
<amp1>(num)
Amplification factor for ADC1_IN
0...65535
The amplification factor is given as 16 bit unsigned integer. An amplification factor of 1 equals 4096, an amplification factor of 2 equals 8192 etc. The TC65 Terminal has typically an amplification factor around 2. See example below.
 
<ofs2>(num)
Offset in mV to be deducted from the measurement <value> captured with AT^SRADC at ADC2_IN.
-32768...+32767
 
 
<amp2>(num)
Amplification factor for ADC2_IN
0...65535
See <amp1> for further detail.


Example

The example shows how to determine the voltage actually measured at ADC1_IN of the TC65 Terminal. First, find out the voltage offset and the amplification factor required for the recalculation of all later measurements done with AT^SRADC:
 
The ADC1_IN line of the TC65 Terminal has the fol­lowing values: voltage offset <ofs1>= 3mV and <amp1>= 8533 which equals an amplification factor of 2.083251953125. The values of ADC2_IN are not relevant for this example.
Measure the voltage applied at ADC1_IN:
 
Now recalculate the value captured with AT^SRADC: